package cn.tedu.kcircle.content.front.adapter.converter;

import cn.tedu.kcircle.content.front.protocol.param.ContentAddParam;
import cn.tedu.kcircle.content.front.repository.model.ContentAddModel;
import cn.tedu.kcircle.content.front.service.bo.ContentAddBO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

@Component
public class ContentConverter {
    public ContentAddModel bo2Model(ContentAddBO contentAddBO){
        ContentAddModel contentAddModel = new ContentAddModel();
        BeanUtils.copyProperties(contentAddBO,contentAddModel);
        return contentAddModel;
    }
    public ContentAddBO param2BO(ContentAddParam contentAddParam){
        ContentAddBO contentAddBO = new ContentAddBO();
        BeanUtils.copyProperties(contentAddParam,contentAddBO);
        return contentAddBO;
    }
}
